home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 8_3.lha / 8_3 / tstdate.c < prev    next >
Text File  |  1993-08-08  |  492b  |  31 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. include <stream.h>
  6. include <string.h>
  7.  
  8. include "8_3_date.c"
  9.  
  10. / copy a stream of dates
  11. include <error.h>
  12. ain(int, char**)
  13.  
  14.    for (;;)
  15. {
  16. date a;
  17. if (!read_date(cout, cin, &a))
  18.     break;
  19. a.print();
  20. cout << "\n";
  21. if (!cout)
  22.     break;
  23. }
  24.  
  25.    if (!cin.eof())
  26. error("error reading input");
  27.    if (cout.bad())
  28. error("error writing output");
  29.    return 0;
  30.  
  31.